package com.captjack.micro.dao.mongodb.base;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;

/**
 * 抽象基类
 *
 * @author Capt Jack
 * @date 2018/2/9
 */
@Component
public abstract class AbstractMongoDataBaseDao {

    /**
     * mongoDb模版
     */
    private MongoTemplate mongoTemplate;

    /**
     * 获取操作类
     *
     * @return 获取操作类
     */
    protected MongoTemplate getMongoTemplate() {
        return mongoTemplate;
    }

    @Autowired
    void setMongoTemplate(MongoTemplate mongoTemplate) {
        this.mongoTemplate = mongoTemplate;
    }

}
